<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>react js</title>
  <style>
    .outer {
      background-color: #20232a;
      padding: 20px 0;
    }
    .outer>.title {
      color: #61dafb;
      text-align: center;
    }
  </style>
</head>
<body>
  <div id="app"></div>
  <script src="../js/react.development.js"></script>
  <script src="../js/react-dom.development.js"></script>
  <script>
    // 创建虚拟节点
    const vDOM = React.createElement('div', {className: 'outer'}, React.createElement('h2', {className: 'title'}, 'react'))
    console.log(vDOM);
    // 获取 DOM 容器
    ReactDOM.createRoot(document.getElementById('app')).render(vDOM)
  </script>
</body>
</html>